package shake.filter;

import java.io.IOException;

import javax.servlet.FilterChain;
import javax.servlet.FilterConfig;
import javax.servlet.ServletException;
import javax.servlet.ServletRequest;
import javax.servlet.ServletResponse;

import org.ajax4jsf.Filter;

import shake.annotation.FilterComponent;
import shake.annotation.JSF;

import com.google.inject.Inject;

@JSF
@FilterComponent
public class Ajax4JsfFilter extends AbstractFilter {

	@Inject
	public Ajax4JsfFilter(Filters filters) {
		super(filters);
	}

	Filter filter = new Filter();

	public void destroy() {
		filter.destroy();
	}

	public void doFilter(ServletRequest request, ServletResponse response,
			FilterChain chain) throws IOException, ServletException {
		filter.doFilter(request, response, chain);
	}

	public void init(FilterConfig config) throws ServletException {
		filter.init(config);
	}

}
